<?php use_helper('Pagination'); ?>

<h1 class="title">Licenciés de CPF Aizenay</h1>
<div class="navPages"><?php echo pager_navigation($licensees_list, url_for('@licensee')); ?></div>
<ul class="licensee-list">
    <li class="head">
        <span>Position</span>
        <span>Nom</span>
        <span>Prénom</span>
        <span>N° licence</span>
        <span>Catégorie</span>
    </li>
    <li class="body">
        <ul>
<?php
$i = ($pager->getPage()-1) * sfConfig::get('app_licensees_max_licensees') + 1;
foreach($licensees_list as $licensee){
    $name = $licensee['lastname'] . " " . $licensee['firstname'];
    ?>
            <li>
                <?php $licensee_html = '<span>' . $i . '</span>'; ?>
                <?php $licensee_html .= '<span>' . $licensee['lastname'] . '</span>'; ?>
                <?php $licensee_html .= '<span>' . $licensee['firstname'] . '</span>'; ?>
                <?php $licensee_html .= '<span>' . $licensee['licensee_number'] . '</span>'; ?>
                <?php $licensee_html .= '<span>' . $licensee['category'] . '</span>'; ?>

                <?php echo link_to($licensee_html, '@member_profil?name_slug=' . $licensee['slug']); ?>
            </li>
    <?php
    $i++;
}
?>
        </ul>
    </li>
</ul>